package com.robotserver.orders.mapper;

import com.robotserver.orders.entity.AlimmTokens;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * @Auther: jianghan
 * @Date: 2019/11/12 11:40
 * @Description:
 */
@Repository
public interface AlimmTokensMapper {
    AlimmTokens getByUserIdAndTurnlink(@Param("userId") Long userId, @Param("turnlink") Integer turnlink);

    void update(AlimmTokens alimmToken);

    void add(AlimmTokens alimmToken);

    List<AlimmTokens> getTokens(@Param("exptime") int exptime,@Param("pageIndex")int pageIndex,@Param("pageSize") int pageSize);

    int getCount(@Param("exptime") int exptime);

    void updateHeartbeat(@Param("id") Long id,@Param("time") int time);

    List<AlimmTokens> getNotRunToken(@Param("validTime") int validTime,@Param("lasttime") int lasttime);

    void updateSettleHeartbeat(@Param("id") Long id,@Param("time") int time);

    List<AlimmTokens> getAllTokens(@Param("exptime") int exptime);

    List<AlimmTokens> getAllElmTokens(@Param("exptime") int exptime);

}
